import request from '@/utils/request'

// 管理员库存记录API
export const adminStockApi = {
  // 分页查询所有库存记录
  getRecordsPage(params) {
    return request({
      url: '/admin/stock/records/page',
      method: 'get',
      params
    })
  },

  // 分页查询入库记录
  getInRecordsPage(params) {
    return request({
      url: '/admin/stock/in-records/page',
      method: 'get',
      params
    })
  },

  // 分页查询出库记录
  getOutRecordsPage(params) {
    return request({
      url: '/admin/stock/out-records/page',
      method: 'get',
      params
    })
  },

  // 获取库存统计信息
  getStatistics() {
    return request({
      url: '/admin/stock/statistics',
      method: 'get'
    })
  },

  // 导出库存记录
  exportRecords(params) {
    return request({
      url: '/admin/stock/records/export',
      method: 'get',
      params,
      responseType: 'blob'
    })
  },

  // 获取库存记录详情
  getRecordDetail(id) {
    return request({
      url: `/admin/stock/records/${id}`,
      method: 'get'
    })
  }
}

export default adminStockApi 